chore: refactor --help and remove deprecated add alias#32
Merged
Conversation
@loongphy/codex-auth-darwin-arm64
@loongphy/codex-auth-darwin-x64
@loongphy/codex-auth-linux-x64
@loongphy/codex-auth-win32-x64
@loongphy/codex-auth
commit: |
Owner
Author
|
@macroscope review |
|
Just FYI for future @mentions, I'm I've triggered the review, but all code reviews were skipped. You can view the details here: |
ApprovabilityVerdict: Would Approve This is a CLI refactoring that removes a previously-deprecated command alias ( Macroscope would have approved this PR. Enable approvability here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Usage errors now produce actionable messages instead of silently showing help.
Invalid invocations (unknown commands, missing values, duplicate flags) return exit code 2 with a specific error message pointing at the problem, rather than silently falling back to top-level help.
Every command supports
--help/-hwith command-specific output.codex-auth list --help,codex-auth import --help, etc. now show focused Usage and Examples sections for that command. codex-auth help works too.addalias is gone.codex-auth add no longer works as a deprecated alias for codex-auth login. Use codex-auth login.
Note
Remove deprecated
addalias for login and add command-specific--helpsupportcodex-auth addalias forcodex-auth loginfrom the CLI, docs, and all deprecation warning code paths.parseArgsin cli.zig to return aParseResultunion (either a parsedCommandor aUsageError) instead of always defaulting to help on bad input.help <command>and<command> --helpnow render targeted usage and examples for each subcommand.json,csv,compact) fromformat.printAccountsin format.zig, which now always renders the table view.codex-auth addis no longer recognized as a valid command; callers using it will now receive a usage error instead of a deprecation warning.Macroscope summarized 63ef466.